- -OPT:space
- The MIPSpro compilers normally make optimization decisions based strictly on the expected execution time effects. If code size is more important, use this option. One of its effects is to cause most subprogram exits to go though a single exit path, with a single copy of register restores, result loads, and so forth.
- -OPT:alias=name
-
The compilers must normally be very conservative in optimization of memory references involving pointers (especially in C), since aliases (that is, different ways of accessing the same memory) may be very hard to detect. This option may be used to specify that the program being compiled avoids aliasing in various ways. alias options are listed below.
- -OPT:alias=any
- The compiler assumes that any pair of memory references may be aliased unless it can prove otherwise. This is the default.
- -OPT:alias=typed
-
The compiler assumes that any pair of memory references that reference distinct types in fact reference distinct data. For example, consider the code:
void dbl ( int *i, float *f ) {
*i = *i + *i;
*f = *f + *f;
}
The compiler assumes that i
and f
point to different memory, and produces an overlapped schedule for the two calculations.
- -OPT:alias=unnamed
-
The compiler assumes that pointers never point to named objects. For example, consider the code:
float g;
void dbl ( float *f ) {
g = g + g;
*f = *f + *f;
}
The compiler assumes that f
cannot point to g
, and produces an overlapped schedule for the two calculations.
This option also implies the alias=typed assumption. Note that this is the default assumption for the pointers implicit in Fortran dummy arguments according to the ANSI standard.
- -OPT:alias=restrict
-
The compiler assumes a very restrictive model of aliasing, where no two pointers ever point to the same memory area. For example, consider the code:
void dbl ( int *i, int *j ) {
*i = *i + *i;
*j = *j + *j;
}
The compiler assumes that i
and j
point to different memory, and produces an overlapped schedule for the two calculations.
Although this is a very dangerous option to use in general, it may produce significantly better code when used for specific well-controlled cases where it is known to be valid.